package com.springboot.chongwu.controller.app;


import com.springboot.chongwu.entity.Jibing;
import com.springboot.chongwu.entity.Zhixunlist;
import com.springboot.chongwu.entity.view.JuanzengView;
import com.springboot.chongwu.entity.view.ZhixunlistView;
import com.springboot.chongwu.qpage.QPage;
import com.springboot.chongwu.service.IZhixunlistService;
import com.springboot.chongwu.util.ResultView;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 咨询记录表 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-09-27
 */
@RestController
@RequestMapping("/api/front/zhixunlist")
public class AppZhixunlistController {

    @Autowired
    private IZhixunlistService service;


    /**
     * 新增
     * @param obj
     * @return
     */
    @PostMapping("/add")
    public ResultView add(@Validated Zhixunlist obj) {
        return this.service.add(obj);
    }

    /**
     * 当前宠物捐赠记录明细
     * @param obj
     * @return
     */
    @GetMapping("/getSelect")
    public ResultView getSelect(ZhixunlistView obj) {
        List<Zhixunlist> sysJydzList=this.service.getSelect(obj);
        return ResultView.ok(sysJydzList);
    }

}
